<template>
	<view>
		<page-head :title="'核验码'" :headtype="2"></page-head>
		<image class="bg" :src="apifun.serveimg+'paysuccess.png'" mode=""></image>
		<view class="qrcode marginAuto">
			<image :src="apifun.URLimg + qrcodeurl" mode=""></image>
			<!-- <canvas id="canvas" canvas-id="canvas" class="canvas"></canvas> -->
		</view>
		<view class="qrcodetxt mainColor">出示给现场人员进行核验</view>
	</view>
</template>

<script>
	import uqrcode from '@/public/uqrcode.js'
	export default {
		data() {
			return {
				apifun:this.apifun,
				qrcodeurl: ''
			};
		},
		onLoad() {
			this.getcode()
		},
		methods: {
			getcode() {
				this.qrcodeurl = uni.getStorageSync('qrcode');
				// uqrcode.make({
				// 	canvasId: 'canvas',
				// 	text: "123132",
				// 	size: 220,
				// }).then((res) => {
				// 	console.log(res)
				// 	this.qrcodeurl = res
				// })
			}
		},
	};
</script>

<style scoped lang="scss">
	.bg{
		position: fixed;
		top: 0;
		left: 0;
		z-index: 0;
		width: 100vw;
		height: 100vh;
	}
	.qrcode{
		position: relative;
		z-index: 10;
		padding:40rpx;
		width: 220px;
		height: 220px;
		background: #fff;
		border-radius: 20rpx;
		margin-top: 160rpx;
		image{
			width: 220px;
			height: 220px;
		}
	}
	.canvas{
		width: 220px;
		height: 220px;
		margin: auto;
	}
	.qrcodetxt{
		position: relative;
		z-index: 10;
		text-align: center;
		padding: 30rpx 0;
		font-size:40rpx;
	}
</style>